package com.eastfair.venueservice.dao;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.eastfair.boot.mapper.SuperMapper;
import com.eastfair.venueservice.dto.ServiceItemDTO;
import com.eastfair.venueservice.dto.ServiceItemQuery;
import com.eastfair.venueservice.entity.ServiceItem;
import com.eastfair.venueservice.vo.ServiceItemDetailVO;
import com.eastfair.venueservice.vo.ServiceItemWithDetailVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * 服务项
 * </p>
 *
 * @author linan
 * @date 2022-07-13
 */
@Repository
public interface ServiceItemMapper extends SuperMapper<ServiceItem> {


    /**
     * 查询服务明细
     * @param queryWrapper queryWrapper
     * @param reportSpaceId reportSpaceId
     * @return List<ServiceItemWithDetailVO>
     */
    @InterceptorIgnore(tenantLine = "1")
    List<ServiceItemWithDetailVO> listServiceItemWithDetail(@Param(Constants.WRAPPER)
                                                            QueryWrapper<ServiceItem> queryWrapper,
                                                            @Param("reportSpaceId")
                                                            Long reportSpaceId);

    /**
     * 主运服务详情
     * @param queryWrapper
     * @param orderNumber
     * @return
     */
    List<ServiceItemWithDetailVO> queryServiceItemOfTransport(@Param(Constants.WRAPPER)
                                                                      QueryWrapper<ServiceItem> queryWrapper,@Param("orderNumber") String orderNumber);

    /**
     * 场馆现场预订服务的服务列表
     * @param wrapper
     * @param orderNumber
     * @return
     */
    List<ServiceItemWithDetailVO> queryServiceItemOfVenue(@Param(Constants.WRAPPER) QueryWrapper<ServiceItem> wrapper, @Param("orderNumber") String orderNumber);

    /**
     * 查询同步给服务商的服务
     * @param serviceItemDTO
     * @return
     */
    List<ServiceItemDetailVO> queryVenueServiceItem(ServiceItemDTO serviceItemDTO);

    /**
     * 查询价目下的规格
     * @param exhibitionManageId
     * @return
     */
    List<Long> queryCategoryIds(@Param("exhibitionManageId") Long exhibitionManageId);
}
